#!/bin/bash
cargo build --target x86_64-unknown-linux-musl --release
strip -s target/x86_64-unknown-linux-musl/release/axum-server
# 防止 Docker 打包 Context 把 target 一大个放进去
mkdir build
cp ../target/x86_64-unknown-linux-musl/release/axum-server build/
docker build -t kkbt/axum-server:v0.1.0 . 
docker save -o axum-server.tar kkbt/axum-server:v0.1.0 && gzip axum-server.tar